import openpyxl
xls = openpyxl.load_workbook('实验三小1班学校学生离校返家信息统计表(1).xlsx')
sheet = xls.sheetnames
active = xls.active
for item in active['A':'B'] :
    for cell in item :
        print(cell.value, end=' ')
    print()

tab = xls[sheet[0]]
row = tab.iter_rows() # 获取指定sheet所有行，每一行是一个元组
clou = tab.iter_cols()  #获取指定sheet所有列，每一列是一个元组
# print(list(res),'---2')
for row in row :
    for cell in row :
        print(cell.value,'\t',end='')
    print()

for clu in clou :
    for cell in clu :
        print(cell.value,'\t',end='')
    print()



# print('--'*40)
# for item in clou :
#     print(list(item))


